<div class="row-fluid">
	<div class="span12">
		<div class="heading clearfix">
			<h3 class="pull-left">分类</h3>
			<span class="pull-right label label-important">5 Orders</span>
		</div>
		
		<div class="w-box" id="w_sort02">
			<div class="w-box-header">
				话题分类
				<div class="pull-right">
					<input type="search" ng-model="q" class="input-medium" placeholder="filter friends..." />
					<a class="btn btn-mini btn-primary" data-toggle="modal" href="#info_modal" ng-click="add();">
                            <i class="icon-plus icon-white"></i> 新增
                    </a>
				</div>
			</div>
			<div class="w-box-content">
				<table class="table table-striped table-bordered mediaTable">
					<thead>
						<tr>
							<th class="optional">编号</th>
							<th class="essential persist">名称</th>
							<th class="optional">内容</th>
							<th class="optional">类型</th>
							<th class="optional">父级编号</th>
							<th class="essential">备注</th>
							<th class="essential">操作</th>
						</tr>
					</thead>
					<tbody>
						<tr ng-repeat="category in categorys">
							<td>{{category.id}}</td>
							<td>{{category.name}}</td>
							<td>{{category.content}}</td>
							<td>{{category.type}}</td>
							<td>{{category.pid}}</td>
							<td>{{category.remark}}</td>
							<td><a href="#info_modal" data-toggle="modal" title="编辑" ng-click="edit(category);">
									<i class="splashy-document_letter_edit"></i></a> 
								<a href="javascript:;" title="删除" ng-click="del($index, category);">
									<i class="splashy-document_letter_remove"></i></a></td>
						</tr>
					</tbody>
				</table>

			</div>
		</div>
	</div>

</div>

<!--编辑-->
<div id="info_modal" class="modal hide fade" tabindex="-1"
	data-width="760">

	<div class="modal-header">
		<button type="button" class="close" data-dismiss="modal"
			aria-hidden="true"></button>
		<h3>话题分类</h3>
	</div>

	<div class="modal-body">
		<div class="row-fluid">
			<form class="form-horizontal" novalidate="novalidate">
				<div class="control-group">
					<label class="control-label"> 名称: <span class="required">*</span>
					</label>
					<div class="controls">
						<input type="text" class="span6 m-wrap" required
							ng-model="category.name">
					</div>
				</div>
				<div class="control-group">
					<label class="control-label"> 父级编号: <span class="required">*</span>
					</label>
					<div class="controls">
						<input type="text" class="span6 m-wrap" required
							ng-model="category.pid" >
					</div>
				</div>
				<div class="control-group">
					<label class="control-label"> 类型: <span class="required">*</span>
					</label>
					<div class="controls">
						<input type="text" class="span6 m-wrap" required
							ng-model="category.type" >
					</div>
				</div>
				<div class="control-group">
					<label class="control-label"> 内容: <span class="required">*</span>
					</label>
					<div class="controls">
						<input type="text" class="span6 m-wrap" required
							ng-model="category.content" >
					</div>
				</div>
				<div class="control-group">
					<label class="control-label"> 备注: <span class="required">*</span>
					</label>
					<div class="controls">
						<input type="text" class="span6 m-wrap" required
							ng-model="category.remark" >
					</div>
				</div>
			</form>
		</div>
	</div>
	<div class="modal-footer">
		<button type="button" class="btn btn-primary" ng-click="save();">保存</button>
		<button type="button" data-dismiss="modal" class="btn">取消</button>
	</div>
</div>


